<template>
    <view style=" overflow-y: auto;height: 100vh;">
        <view class="header" style="position: fixed;top: 0;background-color: #fff;">
            <view><uni-status-bar></uni-status-bar></view>
    
            <view class="search-box flex-cn">
            <view class="navbar-left flex-cn" style="flex: 1" @click="backHome">
                <view
                style="width: 100rpx; text-align: center"
                class="qh-rt-single qh-rt-zuo-zuo navbar-back-icon"
                >
                </view>
            </view>
    
            <view
                style="
                    height: 80rpx;
                    line-height: 80rpx;
                    font-size: 36rpx;
                    font-family: '.PingFang SC, PingFang SC';
                    display: flex;
                    justify-content: center;
                    align-content: center;
                    flex: 1;
                    color: #000;
                    font-weight: 600;
                "
                >
                我的物流
                </view>
                <view style="width: 320rpx; flex: 1"></view>
            </view>   
        </view> 
	
        <view style="padding: 20rpx 30rpx;">
            
        
            <!-- 物流信息  -->
            <view class="list-box" >
                <view class="setTitle" style="margin-top: 100px;">
                    <view class="address-list">
                        <view class="address-left">收货信息</view>
                        <view class="address-right">
                            <image class="address-right-image" src="/static/images/address.png"></image>
                            <view class="right-txt" v-if="logisticsDetails.receiving_phone">
                                <view>{{logisticsDetails.receiving_name}}({{logisticsDetails.receiving_phone}})</view>
                                <view>{{logisticsDetails.receiving_address}}</view>
                            </view>
                        </view>
                    </view>
                    <view class="address-list">
                        <view class="address-left">物流信息</view>
                        <view class="address-right">
                            <view class="address-right-image"></view>
                            <view class="right-txt">
                                <view>订单编号：{{order_no}}</view>
                                <view>物流公司：{{logisticsDetails.express_name ? logisticsDetails.express_name : '暂无物流信息'}}</view>
                                <view>快递单号：{{logisticsDetails.nu ? logisticsDetails.nu : '暂无物流信息' }}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <view class="logistics-lists">
                    <view class="logistics-list" v-for="(item, index) in logisticsDetails.data" :key="index">
                        <view class="logistics-middle">
                            <view class="logistics-round"></view>
                            <view class="logistics-line"></view>
                        </view>
                        <view class="logistics-right">
                            <view class="logistics-left">{{item.ftime}}</view>
                            <view>{{item.context}}</view>
                        </view>
                    </view>
                    <view class="logistics-tips" v-if="!logisticsDetails||!logisticsDetails.data||!logisticsDetails.data.length">暂无物流信息</view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
	// pages/logistics/logistics.js
	// var app = getApp().globalData;

	export default {
		data() {
			return {
				recommendList: [],//推荐商品列表
				recommendPage: 0,//推荐商品分页
				canLoad: true,//推荐商品是否可以加载
				isLoading: false, //推荐商品是否正在加载
				logisticsDetails: "",
				order_no: "",
				order_id: '',
			};
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		 onLoad(options) {
            
			this.order_id = options.id;
            this.getViewLogistics()
		},

		methods: {
            backHome() {
				uni.navigateBack();
			},

			
			//获取物流详情
		async	getViewLogistics() {
                const { status, data, message } = await this.$request(
                        '/SmallProgramApi/ShiFu/seeGiftCardLogistics',{ store_id: this.$store.mallStoreId ,order_id:this.order_id , }
                );
                this.order_no = data.order_no
                // this.receiving_address = data.receiving_address
                // this.receiving_name = data.receiving_name
                // this.receiving_phone = data.receiving_phone
                this.logisticsDetails  = data
                // this.logisticsDetails = data.receiving_address

                console.log(data , 'datadatadata')
			},
			//商品详情
		
		}
	};
</script>
<style>
	@import "./logistics.css";
</style>
